package com.job.zhaokaiqiang;

import java.util.Scanner;

/**
 * @author DELL
 * @version 1.0
 * @since 2022-07-06 12:07:32
 */
public class sanjiao0705 {
    public static void main(String[] args) {
        System.out.println("输入三个值");
        Scanner sc = new Scanner(System.in);
        int s=sc.nextInt();
        int t=sc.nextInt();
        int n=sc.nextInt();
        sanjiao(s,t,n);


    }
    public static void sanjiao(int s,int t,int n)
    {
        int [][]shuzu=new int[n][n];
        int row,col;
        int i;
        for(col=n-1;col>=0;col--)
        {
            for(row=0;row<=col;row++)
            {
                shuzu[row][col]=s;
                s++;
                if(s>t)
                {
                    s=1;
                }
            }
        }
        for(row=0;row<n;row++)
        {
            if(row>=1)
            {
                for(i=0;i<row;i++)
                {
                    System.out.print(" "+"\t");
                }
            }
            for(col=row;col<n;col++)
            {
                System.out.print(shuzu[row][col]+"\t");
            }
            System.out.println();
        }

    }

}
